<?php

class Silk_Zgb_Model_Product extends Mage_Catalog_Model_Product
{
	protected function _afterSave()
	{
		parent::_afterSave();

		//try
		//{
			Mage::helper('mapi/cache')->updateProduct($this);
		//}
		//catch(Exception $e)
		//{
		//	Mage::logException($e);
		//}
		

		// $event = Mage::getSingleton('index/indexer')->logEvent(
		//     $this,
		//     $this->getResource()->getType(),
		//     Mage_Index_Model_Event::TYPE_SAVE,
		//     false
		// );
		// Mage::getSingleton('index/indexer')
		//     ->getProcessByCode('catalog_category_product') // Adjust the indexer process code as needed
		//     ->setMode(Mage_Index_Model_Process::MODE_REAL_TIME)
		//     ->processEvent($event);	
		
		// Mage::getSingleton('index/indexer')
		//     ->getProcessByCode('catalog_product_flat') // Adjust the indexer process code as needed
		//     ->setMode(Mage_Index_Model_Process::MODE_REAL_TIME)
		//     ->processEvent($event);	
	}
}